<?php
echo date("北京时间：Y年m月d日 H:i:s:.v e\n");
$d=new DateTime();
$d=new DateTime("2000-10");
$d=new DateTime("2000-10-5");
$d=new DateTime("2000-10-01 12:34:56");
$d=new DateTime("2000-10 12:34");
$d=new DateTime("12:34");
$d=new DateTime("20001001 123456");
$d=new DateTime("2000/10/01 12:34:56");
print_r($d);
echo $d->format("Y-m-d H:i:s.v e\n");
echo $d->format("年:Y\n");
$a=['name'=>'zs','age'=>18];
$d=new DateTime("1970-1-1 8:0",new DateTimeZone('Asia/shanghai'));
echo "UNIX时间截：",$d->getTimestamp(),"\n" ;
echo (new DateTime("@1761723189"))->format("Y-m-d H:i:s.v e\n");
$d=new DateTime();
echo $d->format("Y-m-d H:i:s.v e\n");
$d->setTimezone(new DateTimeZone("UTC"));
echo $d->format("Y-m-d H:i:s.v e\n");

$d=new DateTime("2025-10-23 12:34:56");
echo $d->format("北京时间：Y-m-d H:i:s.v e\n");
echo $d->modify("+1 day")->format("Y-m-d H:i:s.v e\n");
echo $d->modify("-2 day")->format("Y-m-d H:i:s.v e\n");
echo $d->setDate(2000,10,1)->format("Y-m-d H:i:s.v e\n");
echo $d->modify("2000-10")->format("Y-m-d H:i:s.v e\n");
echo $d->setTime(23,45,)->format("Y-m-d H:i:s.v e\n");
echo $d->modify("23:45")->format("Y-m-d H:i:s.v e\n");

echo $d->modify("monday this week")->format("Y-m-d H:i:s.v e\n");
echo $d->modify("monday last week")->format("Y-m-d H:i:s.v e\n");
echo $d->modify("monday next week")->format("Y-m-d H:i:s.v e\n");

$currentweek=9;
//(new DateTime())->modify("monday")->format("Y-m-d H:i:s.v e\n");
echo  (new DateTime())
       ->modify("monday -$currentweek week +8 hours")
       ->format("Y-m-d H:i:s.v e\n");